package org.dromara.business.domain.bo;

import org.dromara.business.domain.User;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.system.domain.SysUser;

/**
 * 用户信息业务对象 sys_user
 *
 * @author zlj
 * @date 2024-11-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = User.class, reverseConvertGenerate = false)
public class UserBo extends BaseEntity {

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空", groups = { EditGroup.class })
    private Long userId;

    /**
     * 部门ID
     */
    @NotNull(message = "部门ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long deptId;

    /**
     * 用户账号
     */
    @NotBlank(message = "用户账号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String userName;

    /**
     * 用户昵称
     */
    @NotBlank(message = "用户昵称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String nickName;

    /**
     * 用户类型（sys_user系统用户）
     */
    @NotBlank(message = "用户类型（sys_user系统用户）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String userType;

    /**
     * 用户邮箱
     */
    @NotBlank(message = "用户邮箱不能为空", groups = { AddGroup.class, EditGroup.class })
    private String email;

    /**
     * 手机号码
     */
    @NotBlank(message = "手机号码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String phonenumber;

    /**
     * openid
     */
    @NotBlank(message = "openid不能为空", groups = { AddGroup.class, EditGroup.class })
    private String openid;

    /**
     * unionid
     */
    @NotBlank(message = "unionid不能为空", groups = { AddGroup.class, EditGroup.class })
    private String unionid;

    /**
     * 用户性别（0男 1女 2未知）
     */
    @NotBlank(message = "用户性别（0男 1女 2未知）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String sex;

    /**
     * 头像地址
     */
    @NotNull(message = "头像地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long avatar;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String password;

    /**
     * 积分
     */
    @NotNull(message = "积分不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal amount;

    /**
     * 总花费金额 用于用户vip等级评定
     */
    @NotNull(message = "总花费金额 用于用户vip等级评定不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer allAmount;

    /**
     * 帐号状态（0正常 1停用）
     */
    @NotBlank(message = "帐号状态（0正常 1停用）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 最后登录IP
     */
    @NotBlank(message = "最后登录IP不能为空", groups = { AddGroup.class, EditGroup.class })
    private String loginIp;

    /**
     * 最后登录时间
     */
    @NotNull(message = "最后登录时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date loginDate;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;

    /**
     * 二维码
     */
    @NotNull(message = "二维码不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long qrCode;

    /**
     * 上级
     */
    @NotNull(message = "上级不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long superiorId;

    /**
     * 微信头像地址
     */
    @NotBlank(message = "微信头像地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String wxAvatar;

    private Long idCardId;
    private Long idCardNegativeId;

    // 0未审核 1待审核 2审核通过 3审核未通过
    private String ifCardReview;

    //审核理由
    private String reasonsReview;

    // 身份证号码
    private String sfzHm;
    // 身份证姓名
    private String sfzXM;

    // 手持身份证正面
    private Long idCardIdSczm;
    private Date gqTime;
    private Integer hyNumber;

    private String pdf;


}
